#import <Cocoa/Cocoa.h>
#import "ALTimelineView.h"


typedef enum {
	ALResizeDirectionNone,
	ALResizeDirectionUp,
	ALResizeDirectionDown,
	ALResizeDirectionRight
} ALResizeDirection;


@interface ALTimelineElement : NSViewController <NSCopying> {
}

@property (nonatomic, assign) ALTimelineView *timeline;
@property (nonatomic, assign) NSRect previousPosition;
@property (nonatomic, assign) NSRect currentPosition;
@property (nonatomic, assign) NSUInteger daysFromFirst;
@property (nonatomic, assign) BOOL resizable;
@property (nonatomic, assign, readonly) BOOL selected;

-(NSDate *)date;
-(NSSize)preferredSize;
-(NSSize)minimumSize;
-(NSSize)maximumSize;
-(void)timelineElementWasAddedToTimeline;
-(void)timelineElementWasRemovedFromTimeline:(ALTimelineView *)aTimeline;
-(void)timelineElementDidBeginEditingAtPoint:(NSPoint)aPoint;
-(void)timelineElementDidEndEditing;

-(void)updateResizeTrackingAreas;
-(ALResizeDirection)mouseInResizeTrackingArea:(NSPoint)mousePoint; // Point in receiver's coordinates
-(void)trackResizeWithEvent:(NSEvent *)mouseDownEvent withinRect:(NSRect)aRect;
-(NSCursor *)cursorForResizeDirection:(ALResizeDirection)direction;

@end
